Since this is web the way to view a picture is with something like an image control or a link with an image attached. So you basically need to be able to computer the URL to the attached file. This isn't really an XPages computation I don't think. It was often done in classic domino web and that still works.
I don't have any code examples handy but this blog was crucial to me getting started with something like that:
http://www.wissel.net/blog/d6plinks/SHWL-86QKNM
Dave